{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Exploring the board\n",
    "\n",
    "----\n",
    "\n",
    "## Contents\n",
    "\n",
    "* [ARM A9 Processor Subsystem](#ARM-A9-Processor-Subsystem)\n",
    "\n",
    "* [Network Status](#Network-Status)\n",
    "\n",
    "* [Operating System](#Operating-System)\n",
    "\n",
    "* [Python Details](#Python-Details)\n",
    "\n",
    "\n",
    "----\n",
    "\n",
    "## Goal\n",
    "\n",
    "The aim of this notebook is to help you familiarize with the Zynq Processing System, and the underlying Operating System (OS). You will see how to run shell commands and Python commands to query the underlying hardware and software and find out the packages that are included in the PYNQ image. \n",
    "\n",
    "## ARM A9 Processor Subsystem\n",
    "\n",
    "#### Note:\n",
    "\n",
    "Starting a code cell with a bang character, eg `!`, instructs the IPython REPL to treat the code on that line as an OS shell command"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "scrolled": true
   },
   "outputs": [],
   "source": [
    "!cat /proc/cpuinfo"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### Available DRAM ..."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "!cat /proc/meminfo | grep 'Mem*'"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Network Status"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### Wired Ethernet connection"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "scrolled": true
   },
   "outputs": [],
   "source": [
    "!ifconfig eth0"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### Confirm local hostname"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "!hostname"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Operating System\n",
    "\n",
    "#### Verify Linux version ..."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "!cat /etc/os-release | grep VERSION"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Python Details\n",
    "\n",
    "#### Note\n",
    "\n",
    "Here we are executing a Python script rather than shell commands"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "import sys\n",
    "\n",
    "print('\\nPython Version:\\n {} \\n\\nPython Platform:\\n{}\\n'.format(sys.version, sys.platform))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "print ('Python path settings:')\n",
    "for path_entry in sys.path:\n",
    "    print(path_entry)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "# List of all Python packages currently installed\n",
    "!pip list --format=columns"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "# On being 'Pythonic' \n",
    "import this"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.5"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 1
}
